<div class="fm-content">
    <!-- 最上面标题栏 -->
    <div class="title">
        <i nz-icon [type]="'desktop'"></i>
        &nbsp;&nbsp;监管空防安全
    </div>
    <!-- 内容 -->
    <div class="work">

        <!-- 查询框 -->
        <div class="top">
            <!-- first-input -->
            <nz-select class="fm-input first-input" (nzOpenChange)="regulatoryAuthorityDic.load('0')" [(ngModel)]="fs.queryObject['airport:=']" [nzPlaceHolder]="'所属机场'">
                <nz-option *ngFor="let option of regulatoryAuthorityDic.datas" [nzLabel]="option.display"
                    [nzValue]="option.id">
                </nz-option>
                <nz-option *ngIf="airportDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                </nz-option>
            </nz-select>
            <nz-button-group>
                <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
                <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
            </nz-button-group>
            <div class="tool-right">
                <nz-button-group>
                    <button *ngIf="ss.mi.sa || ss.mi.jgkfaqxz" nz-button [nzType]="'primary'" (click)="editRow(null)">新增</button>
                    <!-- <button nz-button (click)="editRow()">编辑</button> -->
                    <button *ngIf="ss.mi.sa || ss.mi.jgkfaqxg" nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()" nzPlacement="bottomRight"
                        nz-button>删除</button>
                  <a nz-button href="assets/images/监管空防安全.xls" download="监管空防安全.xls">模板下载</a>
                  <button nz-button (click)="fs.export('xjmh_jgkf.html', '监管空防安全.xls')">导出</button>
                  <nz-upload nzAction="{{ fs.getExcelUploadUrl() }}" [nzLimit]="1" [nzHeaders]="ffs.fileHeaders"
                             [nzFilter]="fs.excelFilters" [nzAccept]="'.xls,.xlsx'" (nzChange)="excelHandleChange($event)">
                    <button *ngIf="ss.mi.sa || ss.mi.jgkfaqxz" nz-button>导入</button>
                  </nz-upload>
                </nz-button-group>
            </div>
        </div>

        <!-- 右则样表单主体 -->
        <div class="work-content">
            <div class="table">
                <nz-table nzSize="middle" nzBordered nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
                    [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
                    [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
                    (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
                    <thead>
                        <tr>
                            <th rowspan="3" nzShowCheckbox [(nzChecked)]="fs.allChecked"
                                [nzIndeterminate]="fs.indeterminate" (nzCheckedChange)="fs.checkAll($event)"></th>
                            <th rowspan="3" [nzAlign]="'center'">所属监管局</th>
                            <th colspan="7">行政监管</th>
                        </tr>
                        <tr>
                            <th colspan="3">质量控制活动</th>
                            <th colspan="4">行政检查结果</th>
                        </tr>
                        <tr>
                            <th [nzAlign]="'center'">行政检查（次）</th>
                            <th [nzAlign]="'center'">安保审计（次）</th>
                            <th [nzAlign]="'center'">安保测试（次）</th>
                            <th [nzAlign]="'center'">整改通知书（份）</th>
                            <th [nzAlign]="'center'">整改建议书（份）</th>
                            <th [nzAlign]="'center'">行政处罚（起）</th>
                            <th [nzAlign]="'center'">警示谈话、行政约见（次）</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let data of fs.datas">
                            <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
                            </td>
                            <td [nzAlign]="'center'"><span (click)="editRow(data)" class="form-edit">{{data.airportName}}</span></td>
                            <td [nzAlign]="'center'">{{data.administrationcheck}}</td>
                            <td [nzAlign]="'center'">{{data.securityaudit}}</td>
                            <td [nzAlign]="'center'">{{data.securitytest}}</td>
                            <td [nzAlign]="'center'">{{data.changenotice}}</td>
                            <td [nzAlign]="'center'">{{data.changeadvice}}</td>
                            <td [nzAlign]="'center'">{{data.administrationpublish}}</td>
                            <td [nzAlign]="'center'">{{data.administrationtalk}}</td>
                        </tr>
                    </tbody>
                </nz-table>
            </div>
        </div>
    </div>
</div>
